package vivek.project.pocketmoney.common.logger
{
	import flash.data.SQLConnection;
	import flash.data.SQLStatement;
	import mx.collections.ArrayCollection;
	import vivek.project.pocketmoney.common.CommonData;

	public class LogCache
	{
		[Bindable]
		public static var logs:ArrayCollection=new ArrayCollection();

		public static function refreshLogs():void
		{
			var conn:SQLConnection=CommonData.getConnection();
			var statement:SQLStatement=new SQLStatement;
			statement.sqlConnection=conn;
			statement.text="select * from  auditlog";
			statement.execute();
			conn.close();
			logs=new ArrayCollection(statement.getResult().data);
		}

		public function LogCache()
		{
			refreshLogs();
		}
	}
}